package com.cyy.dyeing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyy.dyeing.model.Plan;
import com.cyy.dyeing.dto.PlanDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: cyy
 * @Date: 2024/7/27
 */
@Mapper
public interface PlanMapper extends BaseMapper<Plan>{
    List<Plan> findList(PlanDto planDto);

    @Select("select NULLIF(MAX(plax_xh), 0)+1 from bus_plan where plan_month=#{plan_month}")
    Integer getXh(PlanDto planDto);
}
